package com.pluten.common.utils;

import com.pluten.common.constant.Constants;
import com.pluten.common.core.domain.entity.SysUser;
import com.pluten.common.core.redis.RedisCache;
import com.pluten.common.utils.spring.SpringUtils;

import java.util.List;

public class CacheUtil {


    public static List<SysUser> getUserList(){
        List<SysUser> users = SpringUtils.getBean(RedisCache.class).getCacheList(Constants.SYS_USER_KEY);
        return users;
    }

    public static void setUserList(List<SysUser> users){
        SpringUtils.getBean(RedisCache.class).setCacheList(Constants.SYS_USER_KEY,users);
    }



}
